<!DOCTYPE html>
<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html lang="en">

<body>
	你好啊朋友
	<jsp:include page="ueditor/ueditor.jsp"></jsp:include>
	<button onclick="getContent()">获得内容</button>
</body>
<script>
    var ue = UE.getEditor('editor');
    ue.addListener("ready",function(){
        // 添加监听器为富文本编辑设值
        ue.setContent("<p>2333</p>");
	});

    function getContent() {
        var arr = [];
        arr.push("使用editor.getContent()方法可以获得编辑器的内容");
        arr.push("内容为：");
        arr.push(UE.getEditor('editor').getContent());
        alert(arr.join("\n"));
        console.log(UE.getEditor('editor').getContent());
    }

</script>

</html>
